The WOApplication class provides the following methods that you can override to show your own error page.
For example, the following implementation of handleException:inContext: returns a component named ErrorPage whenever an error occurs in the application.
public WOResponse handleException(java.lang.Throwable anException, WOContext aContext) {Notice that this method, and all of the error-handling methods, return a WOResponse object instead of a WOComponent object.
WOResponse response = aContext.component().
pageWithName("ErrorPage").generateResponse();
return response;
}
Table of Contents
Next Section